Repository navigation
Sync upstream fixes for the deployed ExamPilot app - #2
Merged
Merged
Conversation
Each radar refresh opens two new database connections (the course counts and the user's own flags). Measured from a laptop against the hosted database that is roughly 0.4 s. With a 15-second cache the cost came back on the Knowledge Map and Study Plan every few interactions. Keep the shared session cache for 60 seconds instead. The user's own flag or unflag still appears at once, because it clears the cache through forget_course_radar. The two cache tests now follow the constant.
perf(radar): refresh other students' flags once a minute
Add a section listing the November 2026 additions (step hints, Concept Lab, Learning Radar, accessibility and Chinese interface, Learning DNA and practice insights, guided Limits review, larger demo banks) with links to their docs. Update Features, the Demo Courses table and its pending-review note, Typical Workflow, the persistence lists, Project Structure and the Documentation links to match the current code.
Fix three paper UI acceptance issues
Rebuild the desktop practice page as a paper worksheet
- Study Plan: exam scope uses multi-select pills (same key and values); Correct answer and Learning DNA evidence type are horizontal radios. - Review list shows Needs check / Approved / Flagged instead of internal status codes, and nothing for questions without a review decision. - Save, restore and AI messages no longer show raw database reasons, course IDs, key names or configuration details; successful automatic saves and restores are silent; failures still show. - Remove extraction character/page counts, the Progress storage note, Learning DNA excluded counts and the saved-history note; plain Anki wording; unknown suggested topics fall back to "Topic". - Chinese translations for every new or changed string.
Land the practice worksheet from #65 on main
- components/radar_chart.py: RadarAxis, course_radar_axes, radar_chart_svg (pure SVG, no JavaScript), render_course_radar_chart and render_stuck_buttons (one button per reason plus "Just stuck"). - Knowledge Map: the reason dropdown is replaced by the one-click buttons; the radar panel draws the chart above the ranking, highlighting the selected topic. - New pages/7_Learning_Radar.py: chart, ranking and a topic picker with the stuck buttons and a link to the topic on the Knowledge Map. - Student view no longer shows topic/connection counts, source-page or live-flag bookkeeping, or raw database reasons in failure messages. - assets/paper_radar.css themes the chart and buttons with the paper palette; Chinese strings added under "paper UI: radar".
# Conflicts: # services/i18n.py
Restore treated a course with no saved copy as a failed restore, so later saves of that course were refused. Only real failures (database errors, invalid saved data) now block saving.
The warning was drawn just before st.rerun(), which wiped it at once. Keep a flag in session state and show the generic message once on the next run.
Each session marks new built-in questions as pending in its own copy, and the course merge let the incoming copy win. An older session could therefore turn an approved, flagged or superseded question back to pending. An incoming pending no longer replaces a stored decision; all other combinations still take the incoming value.
sync_demo_catalog runs on every page before navigation is drawn, so an exception while updating one built-in course stopped every page. A failing course is now kept as it was, the error is logged, and the other built-in courses are still updated.
With Simplified English or the Chinese interface on, the glossary and simplified-wording files were opened and parsed several times per question on every rerun. Cache the parsed file per path and return a read-only view so no caller can change the cached data.
Navigation moves back to Streamlit's sidebar (Home, Study Plan, Practice, Progress, Knowledge Map, Learning Radar when its page exists, Concept Lab, Export to Anki) and opens on wide screens, closed on phones. The top row with its review menu and Account popover is gone; the account block, save status and Accessibility settings sit at the foot of the sidebar. st.logo shows the full ExamPilot logo in the sidebar and the plane when it is collapsed. The new paper_shell.css defines the paper palette, keeps the sidebar buttons visible, styles headings, buttons, fields, cards and choice pills, and paints the watercolour landscapes and Home foliage from base64 data URIs that ui_style.py caches. Further paper_*.css sheets load after the shell by file name. The sign-in page shows the headline, the campus watercolour and then the account card, and the Pilot launcher stays below the app header on narrow screens.
The radar stylesheet's opening comment names the feature, and the stylesheet is injected as a markdown element, so the check that a non-demo course shows no radar interface matched the stylesheet itself.
The Concept Lab Limits and Derivatives tabs, the guided review heading and its Unanswered label, the Dashboard Open Study Plan and Continue practice buttons, and the delete-course confirmation stayed in English with the Chinese interface on. The tab default now uses the same translated label as the tabs.
# Conflicts: # services/i18n.py
- Question cards show a two-digit badge (Q01) beside the question text in both modes and in the answer review; answer options gain A.-D. labels. - Confidence is a one-click segmented control (no selection = not recorded); the miss reason and the review topic become pills. - Actions under the question: Previous, Hint, Learning Radar popover (stuck buttons for signed-in demo users) and Next. The worksheet margin draws the course radar chart above the stuck count. Both use components.radar_chart when it is available. - Remove storage and bookkeeping text, shorten count sentences with correct singular/plural forms, never show raw errors, ids or database save reasons, and route every interface string through tr() with Chinese entries. - Add assets/paper_practice.css for the badge, card, action row and margin panel.
# Conflicts: # services/i18n.py
The stylesheet is injected as a markdown element and now carries the illustrations as base64, so searches for raw identifiers and for the question card matched the stylesheet itself.
Preserve Chinese language when navigating between pages
# Conflicts: # services/auth_ui.py
The language fix merged upstream keeps the preference in its own key and gives the toggle a separate widget key, so the sidebar tests look the toggle up by that key. auth_ui no longer needs the preference key.
The four watercolours are embedded in the page stylesheet as data URIs. As PNG they added about 1 MB to it; as WebP they add about 320 KB with no visible difference.
…actice margin The practice margin printed "Includes sample data" under the chart and again under the topic count; it now draws the chart only and leaves the note to the count. The Create course button on Home was a large filled block and is now an outlined card like the others.
- Practice: a late click on a disabled Previous / Next no longer leaves the question range. - Knowledge Map: mastery and demo-load failures show a fixed sentence instead of the raw error with question and session ids; singular "1 knowledge point". - Learning Radar: ranked lists put topics whose count is hidden by the privacy rule after the visible ones, in course order, so the order and the Top 3 cut no longer reveal those counts. - Study Plan: a failed account save after confirming the scope or generating questions is shown after the page refresh instead of being wiped by it; the start button label is translated. - Course tools: when a failed restore blocks saving, Save says to restore first instead of a bare failure. - Accessibility data cache is read-only at every level.
Paper UI: left navigation, one-click choices, Learning Radar chart, and fixes
docs(readme): describe the features added for STEMergent Hacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The live Streamlit app links to this fork, whose main is at 2bfeb41. Upstream main is nine commits ahead with no fork-only commits.
Sync the already merged upstream changes through 2bae835, including PR TraSh9178#67's Chinese-language navigation fix, paper worksheet/UI fixes, and radar caching. Live verification still found the old language widget key and reproduced Chinese resetting to English after opening practice.
PR TraSh9178#67 validation: 1022 passed, 20 skipped; Ubuntu and Windows CI passed. Deployment and post-sync live navigation still require verification by the deployment owner. No credentials are included.